<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>TWTRTwitter Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1333)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">TwitterKit </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">Twitter Inc.</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	
	<optgroup label="Properties">
		
		<option value="//api/name/authConfig">authConfig</option>
		
		<option value="//api/name/sessionStore">sessionStore</option>
		
		<option value="//api/name/version">version</option>
		
	</optgroup>
	

	
	<optgroup label="Class Methods">
		
		<option value="//api/name/sharedInstance">+ sharedInstance</option>
		
	</optgroup>
	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/application:openURL:options:">- application:openURL:options:</option>
		
		<option value="//api/name/logInWithCompletion:">- logInWithCompletion:</option>
		
		<option value="//api/name/logInWithViewController:completion:">- logInWithViewController:completion:</option>
		
		<option value="//api/name/startWithConsumerKey:consumerSecret:">- startWithConsumerKey:consumerSecret:</option>
		
		<option value="//api/name/startWithConsumerKey:consumerSecret:accessGroup:">- startWithConsumerKey:consumerSecret:accessGroup:</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">TWTRTwitter Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>TWTRTwitter.h</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>The central class of the Twitter Kit.</p><div class="note"><p><strong>Note:</strong> This class can only be used from the main thread.</p></div>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/sharedInstance" title="sharedInstance"></a>
	<h3 class="method-title"><code><a href="#//api/name/sharedInstance">+&nbsp;sharedInstance</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Returns the Twitter singleton.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (TWTRTwitter *)sharedInstance</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>The Twitter singleton.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRTwitter.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/startWithConsumerKey:consumerSecret:" title="startWithConsumerKey:consumerSecret:"></a>
	<h3 class="method-title"><code><a href="#//api/name/startWithConsumerKey:consumerSecret:">&ndash;&nbsp;startWithConsumerKey:consumerSecret:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Start Twitter with your consumer key and secret. These will override any credentials
present in your applications Info.plist.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)startWithConsumerKey:(NSString *)<em>consumerKey</em> consumerSecret:(NSString *)<em>consumerSecret</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>consumerKey</code></th>
						<td><p>Your Twitter application&rsquo;s consumer key.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>consumerSecret</code></th>
						<td><p>Your Twitter application&rsquo;s consumer secret.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRTwitter.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/startWithConsumerKey:consumerSecret:accessGroup:" title="startWithConsumerKey:consumerSecret:accessGroup:"></a>
	<h3 class="method-title"><code><a href="#//api/name/startWithConsumerKey:consumerSecret:accessGroup:">&ndash;&nbsp;startWithConsumerKey:consumerSecret:accessGroup:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Start Twitter with a consumer key, secret, and keychain access group. See <a href="#//api/name/startWithConsumerKey:consumerSecret:">[TWTRTwitter startWithConsumerKey:consumerSecret:]</a></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)startWithConsumerKey:(NSString *)<em>consumerKey</em> consumerSecret:(NSString *)<em>consumerSecret</em> accessGroup:(nullable NSString *)<em>accessGroup</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>consumerKey</code></th>
						<td><p>Your Twitter application&rsquo;s consumer key.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>consumerSecret</code></th>
						<td><p>Your Twitter application&rsquo;s consumer secret.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>accessGroup</code></th>
						<td><p>An optional keychain access group to apply to session objects stored in the keychain.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> In the majority of situations applications will not need to specify an access group to use with Twitter sessions.
This value is only needed if you plan to share credentials with another application that you control or if you are
using TwitterKit with an app extension.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRTwitter.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/version" title="version"></a>
	<h3 class="method-title"><code><a href="#//api/name/version">&nbsp;&nbsp;version</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>The current version of this kit.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, readonly) NSString *version</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRTwitter.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/authConfig" title="authConfig"></a>
	<h3 class="method-title"><code><a href="#//api/name/authConfig">&nbsp;&nbsp;authConfig</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Authentication configuration details. Encapsulates the <code>consumerKey</code> and <code>consumerSecret</code> credentials required to authenticate a Twitter application.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) TWTRAuthConfig *authConfig</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRTwitter.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sessionStore" title="sessionStore"></a>
	<h3 class="method-title"><code><a href="#//api/name/sessionStore">&nbsp;&nbsp;sessionStore</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Session store exposing methods to fetch and manage active sessions. Applications that need to manage
multiple users should use the session store to authenticate and log out users.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) TWTRSessionStore *sessionStore</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRTwitter.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/logInWithCompletion:" title="logInWithCompletion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/logInWithCompletion:">&ndash;&nbsp;logInWithCompletion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Triggers user authentication with Twitter.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)logInWithCompletion:(TWTRLogInCompletion)<em>completion</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>completion</code></th>
						<td><p>The completion block will be called after authentication is successful or if there is an error.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>This method will present UI to allow the user to log in if there are no saved Twitter login credentials.
This method is equivalent to calling loginWithMethods:completion: with TWTRLoginMethodAll.</p><div class="warning"><p><strong>Warning:</strong> This method requires that you have set up your <code>consumerKey</code> and <code>consumerSecret</code>.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRTwitter.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/logInWithViewController:completion:" title="logInWithViewController:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/logInWithViewController:completion:">&ndash;&nbsp;logInWithViewController:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Triggers user authentication with Twitter. Allows the developer to specify the presenting view controller.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)logInWithViewController:(nullable UIViewController *)<em>viewController</em> completion:(TWTRLogInCompletion)<em>completion</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>viewController</code></th>
						<td><p>The view controller that will be used to present the authentication view.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>completion</code></th>
						<td><p>The completion block will be called after authentication is successful or if there is an error.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>This method will present UI to allow the user to log in if there are no saved Twitter login credentials.</p><div class="warning"><p><strong>Warning:</strong> This method requires that you have set up your <code>consumerKey</code> and <code>consumerSecret</code>.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRTwitter.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/application:openURL:options:" title="application:openURL:options:"></a>
	<h3 class="method-title"><code><a href="#//api/name/application:openURL:options:">&ndash;&nbsp;application:openURL:options:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Finish the <code>SFSafariViewController</code> authentication loop. This method should
be called from application:openURL:options inside the application delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)application:(UIApplication *)<em>application</em> openURL:(NSURL *)<em>url</em> options:(NSDictionary *)<em>options</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>application</code></th>
						<td><p>The <code>UIApplication</code> instance received as a parameter.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>url</code></th>
						<td><p>The <code>NSURL</code> instance received as a parameter.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>options</code></th>
						<td><p>The options dictionary received as a parameter.</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>Boolean specifying whether this URL was handled
by Twitter Kit or not.</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>This method will verify an authentication token sent by the Twitter API to
finish the web-based authentication flow.</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">TWTRTwitter.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2018 Twitter Inc. All rights reserved. Updated: 2018-10-11</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1333)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>